﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace BBPA.Admin
{
    public partial class Info : System.Web.UI.MasterPage
    {
        InfoPage _InfoPage = null;
        public int id = 0;
        public string idStr = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            _InfoPage = Page as InfoPage;
            DataTypePlus.getPageRequest(Request.QueryString["id"], ref id);
            DataTypePlus.getPageRequest(Request.QueryString["idStr"], ref idStr);
            if (id == 0 && idStr=="") return;
            Security.chkIsLogined();
            _InfoPage.Page_Load_DefaultModel();
            _InfoPage.Page_Load_More();
            if (!IsPostBack)
            {
                _InfoPage.Form_Default();
                _InfoPage.Form_Bind();
            }
        }
        //
        public void ScriptManager_js(string jsStr)
        {
            ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", jsStr, true);
        }
        //
        public void ScriptManager_Alert_float(string msgtitle, bool isSuccess)
        {
            ScriptManager_js(ScriptManager_Alert_float_Str(msgtitle, isSuccess));
        }
        public string ScriptManager_Alert_float_Str(string msgtitle, bool isSuccess)
        {
            string msgcss = "correct";
            if (!isSuccess) msgcss = "error";
            return "parent.Alert_float_(\"" + msgtitle + "\",\"" + msgcss + "\"); ";
        }
        public void ScriptManager_frame_list_page_build(string fenghuolun_TrDatakey)
        {
            ScriptManager_js(ScriptManager_frame_list_page_build_Str(fenghuolun_TrDatakey));
        }
        public string ScriptManager_frame_list_page_build_Str(string fenghuolun_TrDatakey)
        {
            return "parent.frame_list_page_build(\"" + fenghuolun_TrDatakey + "\");";
        }
    }
}